package com.smedi.ismedi.authoritymanagement.api.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @Author: xulinjun
 * @Date: 2021-7-2 10:16
 */
@Data
@Accessors(chain = true)
public class ChangeMobileRequest implements Serializable {
    @ApiModelProperty(value = "手机号", required = true)
    @NotBlank(message = "手机号为空！")
    @Size(min = 11, max = 11, message = "手机号码长度不正确！")
    @Pattern(regexp = "^((1)\\d{10})$", message = "手机号格式错误！")
    private String mobile;

    @ApiModelProperty(value = "人员id", required = true)
    @NotNull(message = "人员id为空！")
    private Long personId;
}
